package ru.xpparty.scanner;

import com.google.inject.Guice;
import com.google.inject.Injector;

import ru.xpparty.scanner.model.ScanRequest;

/**
 * Entry point to scanner application. Now plays role of dependency injection
 * container :-).
 * 
 * @author xp.party
 * 
 */
public class Main {
	public static void main(String[] args) {
		ArgumentsBuilder builder = new ArgumentBuilderImpl();
		ScanRequest request = builder.build(args);	
		
		Injector injector = Guice.createInjector(new ScanningManagerModule());
		ScanningManager manager = injector.getInstance(ScanningManager.class);
		
		ScanResult result = manager.scan(request);
		System.out.println(result.toString());
	}
}
